//
//  SecondSubViewController.swift
//  UIScrollViewDemo
//
//  Created by chengxiang on 2018/6/25.
//  Copyright © 2018年 chengxiang. All rights reserved.
//

import UIKit

class SecondSubViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.yellow
        let image = UIImageView(frame: CGRect(x: 0, y: 40, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height))
        image.image = UIImage(named: "timg-2")
        image.center = self.view.center
        
        let gest = UIGestureRecognizer(target: image, action: #selector(SecondSubViewController.tap(_:)))
        
        image.addGestureRecognizer(gest)
        self.view.addSubview(image)
        // Do any additional setup after loading the view.
    }

    @objc func tap(_ sender: UIGestureRecognizer){
        
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
